// import Vue from "vue";
import Vue from "vue";
import Router from "vue-router";
import Login from "@/views/login/Login.vue";
import Home from "@/views/home/Home.vue";
import Project from "@/views/project/Project.vue";
import ProjectDetail from "@/views/project/ProjectDetail.vue";
import ProjectForm from "@/views/project/ProjectForm.vue";

import AddProjectFirstStep from '@/views/project/add/AddProjectFirstStep.vue';
import AddProjectSecondStep from '@/views/project/add/AddProjectSecondStep.vue';
import AddProjectThirdStep from '@/views/project/add/AddProjectThirdStep.vue';

import Role from "@/views/role/Role.vue";
import Person from "@/views/person/Person.vue";

import {ProjectRouterArray} from "./project-router";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      name: "login",
      component: Login
    },
    {
      path: "/home",
      name: "home",
      component: Home,
      redirect: "/home/project",
      children: [
          {
              path: "role",
              name: "role",
              component: Role,
          }, {
              path: "person",
              name: "person",
              component: Person,
          }, ...ProjectRouterArray]
    }
  ]
});
